<!-- 图片组件 -->
<template>
  <div
    class="imagesview"
    :style="{
      padding: config.ConfigData.padding
        ? '0'
        : '0 ' + config.ConfigData.padding + 'px',
      'background-color': config.ConfigData.bgcolor,
      margin: '0 ' + config.ConfigData.margin + 'px'
    }"
  >
    <div v-for="(item, index) in config.ConfigData.items" :key="index">
      <img
        mode="widthFix"
        :alt="item.name"
        :src="item.imgurl | getgalleryImg('w750')"
        class="imgcoptc"
        :style="{ 'border-radius': config.ConfigData.radius + 'px' }"
      />
    </div>
  </div>
</template>

<script>
import { isReallyNull, getCompressProductImg } from "@/utils/utils";

export default {
  name: "ImgCopt",
  props: {
    config: Object
  },
  data() {
    return {};
  },
  methods: {
    // ngt(item, items) {
    //   if (isReallyNull(item.linktype) || isReallyNull(item.bizsysnos)) {
    //     let urls = [];
    //     if (this.couldPre === "1") {
    //       items.map(e => urls.push(getCompressProductImg(e.imgurl, "w1080")));
    //       // wepy.previewImage({
    //       //   current: getCompressProductImg(item.imgurl, "w1080"),
    //       //   urls: urls // 需要预览的图片链接列表,
    //       // });
    //     }
    //     return;
    //   }
    //   this.$emit("comsngt", item);
    // }
  },
  mounted() {}
};
</script>

<style lang="scss">
.imagesview {
  display: flex;
  flex-direction: column;
}
.imgcoptc {
  width: 100%;
}
</style>
